home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / lightwave / lwmlist / 96.lightwave-0208 / 000065_lightwave@garcia.com _Thu Dec 7 03:45:49 1995.msg < prev    next >
Internet Message Format  |  1995-12-14  |  2KB

  1. Received: from relay7.UU.NET (relay7.UU.NET [192.48.96.17]) by keeper.albany.net (8.7.1/8.7.1) with ESMTP id DAA11344 for <dwarner@albany.net>; Thu, 7 Dec 1995 03:45:48 -0500 (EST)
  2. Received: from garcia.com by relay7.UU.NET with SMTP 
  3.     id QQztbe22135; Thu, 7 Dec 1995 03:43:35 -0500 (EST)
  4. Received: from  (localhost) by garcia.com (5.x/SMI-SVR4)
  5.     id AA12694; Thu, 7 Dec 1995 03:43:58 -0500
  6. Date: Thu, 7 Dec 1995 03:43:58 -0500
  7. Errors-To: dwarner@albany.net
  8. Message-Id: <Pine.SUN.3.91.951207024819.14485C-100000@access4.digex.net>
  9. Errors-To: dwarner@albany.net
  10. Reply-To: lightwave@garcia.com
  11. Originator: lightwave@garcia.com
  12. Sender: lightwave@garcia.com
  13. Precedence: bulk
  14. From: Ernie Wright <erniew@access.digex.net>
  15. To: Multiple recipients of list <lightwave@garcia.com>
  16. Subject: Re: Dialog Box in Windows
  17. X-Listprocessor-Version: 6.0c -- ListProcessor by Anastasios Kotsikonas
  18. Status: RO
  19. X-Status: 
  20.  
  21. Mark Fletcher wrote:
  22.  
  23. > ... am using the code I've gotten from this list:
  24. >
  25. > hdi = global( "Host Display Info", GFUSE_TRANSIENT );
  26. > hinst = GetModuleHandle( "myplugin.p" );
  27. > DialogBox( hinst, "DialogName", hdi->window, DialogProc );
  28. >
  29. > And the dialog never pops up.
  30.  
  31. Gee, that code looks familiar.
  32.  
  33. Since this is your first Windows code, I'd look hard at the dialog
  34. callback.  Also make sure the dialog template has the WS_POPUP (and not
  35. the WS_CHILD) style.
  36.  
  37. Dumb questions:  Have you changed the GetModuleHandle() argument to the
  38. name of your plugin?  Have you changed "DialogName" to the name of the
  39. dialog template?  Have you verified that <hdi> and <hinst> aren't NULL?
  40.  
  41. > For some reason I have to cast the DialogProc pointer in the DialogBox
  42. > function call to (FARPROC) in order for it to compile (DialogProc is 
  43. > prototyped as per the manual). 
  44.  
  45. MSVC is just being picky--it implements type equivalence in a relatively
  46. narrow way.  Watcom, for example, doesn't require a cast.  This isn't 
  47. the source of your problem.
  48.  
  49. I know lwplugin-l is pokey as hell (it takes two or three days for posts
  50. to show up), but we should probably take this discussion there, rather
  51. than frightening all these good people.
  52.  
  53. - Ernie